package com.itheima.neibulei.demo;

public class Demo {

    public static void main(String[] args) {
        Outer outer = new Outer();
        outer.i = 10;
        System.out.println(outer.i);
        outer.sing();
        Outer.Inner inner = new Outer().new Inner();
        inner.j = 20;
        System.out.println(inner.j);
        inner.dance();
    }
}

class Outer {
     int i;

    public void sing() {
        System.out.println(i);
        Inner inner = new Inner();
        System.out.println(inner.j);
        inner.dance();
    }

    class Inner {
        int j;

        public void dance() {
            System.out.println(i);
        }
    }
}
